<template>
  <div class="page">
    <div class="page__hd">
      <h1 class="page__title"> 用户登录信息 </h1>
    </div>

    <h2>服务器</h2>
    <!--    todo-->
    <div>{{ mine }}</div>
    <h2> 本地</h2>

    <div class="page__bd page__bd_spacing">
      <div v-if="userInfo" class="weui-flex">
        <div class="weui-flex__item">
          <div class="placeholder">
            <div style="  word-break: break-all;
  white-space: normal;">登录信息(user) :{{ user }}
            </div>
          </div>
        </div>
      </div>

      <div v-if="userToken" class="weui-flex">
        <div class="weui-flex__item">
          <div class="placeholder">
            <div style="  word-break: break-all;
    white-space: normal;">登录token :{{ userToken }}
            </div>
          </div>
        </div>
      </div>
    </div>

  </div>
</template>

<script>
import {mapGetters, mapActions} from 'vuex'


export default {
  name: 'User',
  data() {
    return {
      mine: null,
    }
  },
  computed: {
    ...mapGetters([
      'userToken',
      'userInfo',
    ]),
    url() {
      return window.location.href
    },
    user() {
      return JSON.stringify(this.userInfo)
    }
  },
  created() {

  },
  methods: {},
}
</script>
